package cn.camel.algorithm.tree.rbt;

import lombok.Data;

/**
 * @author: Camel
 * @description: 红黑树节点
 * @date: 2025/10/18 14:43
 */
@Data
public class RBNode<T extends Comparable<T>> {
    private T data;
    private Color color;
    RBNode<T> left, right, parent;

    public RBNode(T data) {
        this.data = data;
        this.color = Color.RED; // 新节点默认为红色
        this.left = this.right = this.parent = null;
    }
}
